<template>
    <div>
        <common-title :stitle="alldata.stitle"></common-title>
        <div>
            <el-table :border="true" :data="alldata.datas" style="width: 100%" @row-click="tableClick">
                <el-table-column v-for="col in alldata.titles" :label="col.label" :prop="col.prop" :key="col.label">
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import Vue from 'vue'
import commonTitleMixin from '../mixins/commonTitleMixin'
export default {
    name: 'diamond',
    data: function () {
        return {
        }
    },
    props: ['alldata'],
    mixins: [commonTitleMixin],
    mounted () {
        //console.log('todo', this.alldata)
    },
    methods: {
        tableClick: function (row) {
            let itemid = row.activity_id
            this.$router.push({ name: 'card', query: { itemid: itemid, idobject: 'activity', idtemplate: '' } })
        }
    }
}
</script>
